#include "serialthread.h"

SerialThread::SerialThread(QWidget *parent) : QThread(parent)
{
    Port = 0;
    IsRun = 1;
}

void SerialThread::setPort(MySerial *s)
{
    Port = s;
}

void SerialThread::setRun(bool i)
{
    IsRun = i;
}


/*  函数名称: run
 *  函数作用: 线程处理函数
 *
 */
void SerialThread::run()
{
    while(IsRun)
    {
        Port->RevData();
    }
}
